<aside class="main-sidebar">

    <section class="sidebar">
        <!-- /.search form -->
        <?php
            $callback = function ($menu)
            {
                $base = ['label' => $menu['name'], 'url' => [$menu['route']], 'items' => $menu['children']];
                if (trim($menu['data']) != '')
                {
                    $base += json_decode($menu['data'], TRUE);
                }
                return $base;
            };
            $items = \mdm\admin\components\MenuHelper::getAssignedMenu(Yii::$app->user->id, 2, $callback);
            
            $config = [
                'options'         => ['class' => 'sidebar-menu'],
                'encodeLabels'    => false,
                'activateParents' => true,
               // 'linkTemplate'    => '<a href="{url}"><i class="fa fa-circle-o"></i>  <span>{label}</span></a>',
               // 'submenuTemplate' => '<ul class="treeview-menu">{items}</ul>',
                'items'           => $items
            ];
            echo dmstr\widgets\Menu::widget($config);
        ?>

    </section>

</aside>
